<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="c" 	 uri="http://java.sun.com/jsp/jstl/core"%>

<%@include file="/jsp/backoffice/include/header.jsp" %>

	<div class="panelblock">
		<h2><bean:message bundle="backoffice" key="page.list.category.title"/></h2>
		<div class="results">
			<table class="filelist">
				<tr class="clickable_headers">
					<th style="width:50px">&nbsp;</th>
					<th><bean:message bundle="backoffice" key="page.list.category.table.name" /></th>
					<th><bean:message bundle="backoffice" key="page.list.category.table.parent" /></th>
					<th><bean:message bundle="backoffice" key="page.list.category.table.description" /></th>
				</tr>
				<c:set var="style" value="even"/>
				<c:forEach items="${categories}" var="c">
					<tr class="${style} lastline">
						<td class="center"><a href="/backoffice/editCategory.do?id=${c.id}"><c:out value="${c.id}"/></a></td>
						<td><a href="/backoffice/editCategory.do?id=${c.id}"><c:out value="${c.name}"/></a></td>
						<td class="center"><c:out value="${c.parent}"/></td>
						<td><c:out value="${c.description}"/></td>
					</tr>
					<c:choose><c:when test="${style =='even'}"><c:set var="style" value="odd"/></c:when><c:otherwise><c:set var="style" value="even"/></c:otherwise></c:choose>
				</c:forEach>
			</table>
			<div class="results_nav"></div>
		</div>
	</div>

<%@include file="/jsp/backoffice/include/footer.jsp" %>